const express = require('express');
const app = express();
const webpack = require('webpack');
const middle = require('webpack-dev-middleware');
const config = require('./webpack.config');

let compiler = webpack(config);
app.use(middle(compiler));


app.get('/login',(req,res)=>{
    res.json({a:'123'})
});

app.get('/user',(req,res)=>{
    res.json({user:'lei'})
});

app.listen(3001);
